<script>
  import CommonUserHome from '@/views/module/home/CommonUserHome.vue'
  import PersonnelFile from '@/module/admin/userinfo/PersonalFile.vue'
  import Secretasset from '@/module/asset/secretasset/index.vue'
  import { getStore } from '@/util/store'
  import { hasAuthority } from '@/util/auth'

  export default {
    name: 'Home',
    components: {
      PersonnelFile,
      CommonUserHome
    },
    render(createElement, context) {
      return process.env.NODE_ENV !== 'production' || process.env.VUE_APP_TENANT === 'asset' ? (
        <CommonUserHome />
      ) : hasAuthority('secretasset_secretasset_view') ? (
        <Secretasset />
      ) : !getStore('homeType') || getStore('homeType') === 'video' ? (
        <PersonnelFile />
      ) : null
    }
  }
</script>

<style lang="scss">
  .home {
    @include flex-row;
    width: 100%;
    min-width: 1200px;
    height: 100%;
    min-height: 615px;
    overflow: hidden;

    .card-style {
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    }

    .el-row {
      height: 100%;
    }

    .el-col {
      height: 100%;
    }
  }
</style>
